using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Security;
using System.Runtime.InteropServices.ComTypes;


namespace Win32SDK
{
    [ComImport, Guid("0000000A-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface ILockBytes
    {
        void ReadAt([In, MarshalAs(UnmanagedType.U8)] long ulOffset, [Out] IntPtr pv, [In, MarshalAs(UnmanagedType.U4)] int cb, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pcbRead);
        void WriteAt([In, MarshalAs(UnmanagedType.U8)] long ulOffset, IntPtr pv, [In, MarshalAs(UnmanagedType.U4)] int cb, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pcbWritten);
        void Flush();
        void SetSize([In, MarshalAs(UnmanagedType.U8)] long cb);
        void LockRegion([In, MarshalAs(UnmanagedType.U8)] long libOffset, [In, MarshalAs(UnmanagedType.U8)] long cb, [In, MarshalAs(UnmanagedType.U4)] int dwLockType);
        void UnlockRegion([In, MarshalAs(UnmanagedType.U8)] long libOffset, [In, MarshalAs(UnmanagedType.U8)] long cb, [In, MarshalAs(UnmanagedType.U4)] int dwLockType);
        void Stat([Out] STATSTG pstatstg, [In, MarshalAs(UnmanagedType.U4)] int grfStatFlag);
    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), SuppressUnmanagedCodeSecurity, Guid("0000000C-0000-0000-C000-000000000046")]
    public interface IStream
    {
        int Read(IntPtr buf, int len);
        int Write(IntPtr buf, int len);
        [return: MarshalAs(UnmanagedType.I8)]
        long Seek([In, MarshalAs(UnmanagedType.I8)] long dlibMove, int dwOrigin);
        void SetSize([In, MarshalAs(UnmanagedType.I8)] long libNewSize);
        [return: MarshalAs(UnmanagedType.I8)]
        long CopyTo([In, MarshalAs(UnmanagedType.Interface)] IStream pstm, [In, MarshalAs(UnmanagedType.I8)] long cb, [Out, MarshalAs(UnmanagedType.LPArray)] long[] pcbRead);
        void Commit(int grfCommitFlags);
        void Revert();
        void LockRegion([In, MarshalAs(UnmanagedType.I8)] long libOffset, [In, MarshalAs(UnmanagedType.I8)] long cb, int dwLockType);
        void UnlockRegion([In, MarshalAs(UnmanagedType.I8)] long libOffset, [In, MarshalAs(UnmanagedType.I8)] long cb, int dwLockType);
        void Stat([Out] STATSTG pStatstg, int grfStatFlag);
        [return: MarshalAs(UnmanagedType.Interface)]
        IStream Clone();
    }
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("0000000B-0000-0000-C000-000000000046")]
    public interface IStorage
    {
        [return: MarshalAs(UnmanagedType.Interface)]
        IStream CreateStream([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In, MarshalAs(UnmanagedType.U4)] int grfMode, [In, MarshalAs(UnmanagedType.U4)] int reserved1, [In, MarshalAs(UnmanagedType.U4)] int reserved2);
        [return: MarshalAs(UnmanagedType.Interface)]
        IStream OpenStream([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, IntPtr reserved1, [In, MarshalAs(UnmanagedType.U4)] int grfMode, [In, MarshalAs(UnmanagedType.U4)] int reserved2);
        [return: MarshalAs(UnmanagedType.Interface)]
        IStorage CreateStorage([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In, MarshalAs(UnmanagedType.U4)] int grfMode, [In, MarshalAs(UnmanagedType.U4)] int reserved1, [In, MarshalAs(UnmanagedType.U4)] int reserved2);
        [return: MarshalAs(UnmanagedType.Interface)]
        IStorage OpenStorage([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, IntPtr pstgPriority, [In, MarshalAs(UnmanagedType.U4)] int grfMode, IntPtr snbExclude, [In, MarshalAs(UnmanagedType.U4)] int reserved);
        void CopyTo(int ciidExclude, [In, MarshalAs(UnmanagedType.LPArray)] Guid[] pIIDExclude, IntPtr snbExclude, [In, MarshalAs(UnmanagedType.Interface)] IStorage stgDest);
        void MoveElementTo([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In, MarshalAs(UnmanagedType.Interface)] IStorage stgDest, [In, MarshalAs(UnmanagedType.BStr)] string pwcsNewName, [In, MarshalAs(UnmanagedType.U4)] int grfFlags);
        void Commit(int grfCommitFlags);
        void Revert();
        void EnumElements([In, MarshalAs(UnmanagedType.U4)] int reserved1, IntPtr reserved2, [In, MarshalAs(UnmanagedType.U4)] int reserved3, [MarshalAs(UnmanagedType.Interface)] out object ppVal);
        void DestroyElement([In, MarshalAs(UnmanagedType.BStr)] string pwcsName);
        void RenameElement([In, MarshalAs(UnmanagedType.BStr)] string pwcsOldName, [In, MarshalAs(UnmanagedType.BStr)] string pwcsNewName);
        void SetElementTimes([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In] FILETIME pctime, [In] FILETIME patime, [In] FILETIME pmtime);
        void SetClass([In] ref Guid clsid);
        void SetStateBits(int grfStateBits, int grfMask);
        void Stat([Out] STATSTG pStatStg, int grfStatFlag);
    }

 

 

    [ComImport, Guid("00000122-0000-0000-C000-000000000046"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IOleDropTarget
    {
        [PreserveSig]
        int OleDragEnter([In, MarshalAs(UnmanagedType.Interface)] object pDataObj, [In, MarshalAs(UnmanagedType.U4)] int grfKeyState, [In, MarshalAs(UnmanagedType.U8)] long pt, [In, Out] ref int pdwEffect);
        [PreserveSig]
        int OleDragOver([In, MarshalAs(UnmanagedType.U4)] int grfKeyState, [In, MarshalAs(UnmanagedType.U8)] long pt, [In, Out] ref int pdwEffect);
        [PreserveSig]
        int OleDragLeave();
        [PreserveSig]
        int OleDrop([In, MarshalAs(UnmanagedType.Interface)] object pDataObj, [In, MarshalAs(UnmanagedType.U4)] int grfKeyState, [In, MarshalAs(UnmanagedType.U8)] long pt, [In, Out] ref int pdwEffect);
    }
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), SuppressUnmanagedCodeSecurity, Guid("00000112-0000-0000-C000-000000000046")]
    public interface IOleObject
    {
        [PreserveSig]
        int SetClientSite([In, MarshalAs(UnmanagedType.Interface)] IOleClientSite pClientSite);
        IOleClientSite GetClientSite();
        [PreserveSig]
        int SetHostNames([In, MarshalAs(UnmanagedType.LPWStr)] string szContainerApp, [In, MarshalAs(UnmanagedType.LPWStr)] string szContainerObj);
        [PreserveSig]
        int Close(int dwSaveOption);
        [PreserveSig]
        int SetMoniker([In, MarshalAs(UnmanagedType.U4)] int dwWhichMoniker, [In, MarshalAs(UnmanagedType.Interface)] object pmk);
        [PreserveSig]
        int GetMoniker([In, MarshalAs(UnmanagedType.U4)] int dwAssign, [In, MarshalAs(UnmanagedType.U4)] int dwWhichMoniker, [MarshalAs(UnmanagedType.Interface)] out object moniker);
        [PreserveSig]
        int InitFromData([In, MarshalAs(UnmanagedType.Interface)] IDataObject pDataObject, int fCreation, [In, MarshalAs(UnmanagedType.U4)] int dwReserved);
        [PreserveSig]
        int GetClipboardData([In, MarshalAs(UnmanagedType.U4)] int dwReserved, out IDataObject data);
        [PreserveSig]
        int DoVerb(int iVerb, [In] IntPtr lpmsg, [In, MarshalAs(UnmanagedType.Interface)] IOleClientSite pActiveSite, int lindex, IntPtr hwndParent, [In] COMRECT lprcPosRect);
        [PreserveSig]
        int EnumVerbs(out IEnumOLEVERB e);
        [PreserveSig]
        int OleUpdate();
        [PreserveSig]
        int IsUpToDate();
        [PreserveSig]
        int GetUserClassID([In, Out] ref Guid pClsid);
        [PreserveSig]
        int GetUserType([In, MarshalAs(UnmanagedType.U4)] int dwFormOfType, [MarshalAs(UnmanagedType.LPWStr)] out string userType);
        [PreserveSig]
        int SetExtent([In, MarshalAs(UnmanagedType.U4)] int dwDrawAspect, [In] tagSIZEL pSizel);
        [PreserveSig]
        int GetExtent([In, MarshalAs(UnmanagedType.U4)] int dwDrawAspect, [Out] tagSIZEL pSizel);
        [PreserveSig]
        int Advise(IAdviseSink pAdvSink, out int cookie);
        [PreserveSig]
        int Unadvise([In, MarshalAs(UnmanagedType.U4)] int dwConnection);
        [PreserveSig]
        int EnumAdvise(out IEnumSTATDATA e);
        [PreserveSig]
        int GetMiscStatus([In, MarshalAs(UnmanagedType.U4)] int dwAspect, out int misc);
        [PreserveSig]
        int SetColorScheme([In] tagLOGPALETTE pLogpal);
    }
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000109-0000-0000-C000-000000000046")]
    public interface IPersistStream
    {
        void GetClassID(out Guid pClassId);
        [PreserveSig]
        int IsDirty();
        void Load([In, MarshalAs(UnmanagedType.Interface)] IStream pstm);
        void Save([In, MarshalAs(UnmanagedType.Interface)] IStream pstm, [In, MarshalAs(UnmanagedType.Bool)] bool fClearDirty);
        long GetSizeMax();
    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("B196B28F-BAB4-101A-B69C-00AA00341D07")]
    public interface IClassFactory2
    {
        void CreateInstance([In, MarshalAs(UnmanagedType.Interface)] object unused, [In] ref Guid refiid, [Out, MarshalAs(UnmanagedType.LPArray)] object[] ppunk);
        void LockServer(int fLock);
        void GetLicInfo([Out] tagLICINFO licInfo);
        void RequestLicKey([In, MarshalAs(UnmanagedType.U4)] int dwReserved, [Out, MarshalAs(UnmanagedType.LPArray)] string[] pBstrKey);
        void CreateInstanceLic([In, MarshalAs(UnmanagedType.Interface)] object pUnkOuter, [In, MarshalAs(UnmanagedType.Interface)] object pUnkReserved, [In] ref Guid riid, [In, MarshalAs(UnmanagedType.BStr)] string bstrKey, [MarshalAs(UnmanagedType.Interface)] out object ppVal);
    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000002-0000-0000-c000-000000000046"), SuppressUnmanagedCodeSecurity]
    public interface IMalloc
    {
        [PreserveSig]
        IntPtr Alloc(int cb);
        [PreserveSig]
        IntPtr Realloc(IntPtr pv, int cb);
        [PreserveSig]
        void Free(IntPtr pv);
        [PreserveSig]
        int GetSize(IntPtr pv);
        [PreserveSig]
        int DidAlloc(IntPtr pv);
        [PreserveSig]
        void HeapMinimize();
    }
    [ComImport, Guid("BEF6E002-A874-101A-8BBA-00AA00300CAB"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IFont
    {
        [return: MarshalAs(UnmanagedType.BStr)]
        string GetName();
        void SetName([In, MarshalAs(UnmanagedType.BStr)] string pname);
        [return: MarshalAs(UnmanagedType.U8)]
        long GetSize();
        void SetSize([In, MarshalAs(UnmanagedType.U8)] long psize);
        [return: MarshalAs(UnmanagedType.Bool)]
        bool GetBold();
        void SetBold([In, MarshalAs(UnmanagedType.Bool)] bool pbold);
        [return: MarshalAs(UnmanagedType.Bool)]
        bool GetItalic();
        void SetItalic([In, MarshalAs(UnmanagedType.Bool)] bool pitalic);
        [return: MarshalAs(UnmanagedType.Bool)]
        bool GetUnderline();
        void SetUnderline([In, MarshalAs(UnmanagedType.Bool)] bool punderline);
        [return: MarshalAs(UnmanagedType.Bool)]
        bool GetStrikethrough();
        void SetStrikethrough([In, MarshalAs(UnmanagedType.Bool)] bool pstrikethrough);
        [return: MarshalAs(UnmanagedType.I2)]
        short GetWeight();
        void SetWeight([In, MarshalAs(UnmanagedType.I2)] short pweight);
        [return: MarshalAs(UnmanagedType.I2)]
        short GetCharset();
        void SetCharset([In, MarshalAs(UnmanagedType.I2)] short pcharset);
        IntPtr GetHFont();
        void Clone(out IFont ppfont);
        [PreserveSig]
        int IsEqual([In, MarshalAs(UnmanagedType.Interface)] IFont pfontOther);
        void SetRatio(int cyLogical, int cyHimetric);
        void QueryTextMetrics(out IntPtr ptm);
        void AddRefHfont(IntPtr hFont);
        void ReleaseHfont(IntPtr hFont);
        void SetHdc(IntPtr hdc);
    }




    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIDispatch), Guid("7BF80981-BF32-101A-8BBB-00AA00300CAB")]
    public interface IPictureDisp
    {
        IntPtr Handle { get; }
        IntPtr HPal { get; }
        short PictureType { get; }
        int Width { get; }
        int Height { get; }
        void Render(IntPtr hdc, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc);
    }

    [ComImport, Guid("7BF80980-BF32-101A-8BBB-00AA00300CAB"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IPicture
    {
        IntPtr GetHandle();
        IntPtr GetHPal();
        [return: MarshalAs(UnmanagedType.I2)]
        short GetPictureType();
        int GetWidth();
        int GetHeight();
        void Render(IntPtr hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc, IntPtr rcBounds);
        void SetHPal(IntPtr phpal);
        IntPtr GetCurDC();
        void SelectPicture(IntPtr hdcIn, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] phdcOut, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] phbmpOut);
        [return: MarshalAs(UnmanagedType.Bool)]
        bool GetKeepOriginalFormat();
        void SetKeepOriginalFormat([In, MarshalAs(UnmanagedType.Bool)] bool pfkeep);
        void PictureChanged();
        [PreserveSig]
        int SaveAsFile([In, MarshalAs(UnmanagedType.Interface)] IStream pstm, int fSaveMemCopy, out int pcbSize);
        int GetAttributes();
    }
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("1CF2B120-547D-101B-8E65-08002B2BD119")]
    public interface IErrorInfo
    {
        [PreserveSig, SuppressUnmanagedCodeSecurity]
        int GetGUID(out Guid pguid);
        [PreserveSig, SuppressUnmanagedCodeSecurity]
        int GetSource([In, Out, MarshalAs(UnmanagedType.BStr)] ref string pBstrSource);
        [PreserveSig, SuppressUnmanagedCodeSecurity]
        int GetDescription([In, Out, MarshalAs(UnmanagedType.BStr)] ref string pBstrDescription);
        [PreserveSig, SuppressUnmanagedCodeSecurity]
        int GetHelpFile([In, Out, MarshalAs(UnmanagedType.BStr)] ref string pBstrHelpFile);
        [PreserveSig, SuppressUnmanagedCodeSecurity]
        int GetHelpContext([In, Out, MarshalAs(UnmanagedType.U4)] ref int pdwHelpContext);
    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000118-0000-0000-C000-000000000046")]
    public interface IOleClientSite
    {
        [PreserveSig]
        int SaveObject();
        [PreserveSig]
        int GetMoniker([In, MarshalAs(UnmanagedType.U4)] int dwAssign, [In, MarshalAs(UnmanagedType.U4)] int dwWhichMoniker, [MarshalAs(UnmanagedType.Interface)] out object moniker);
        [PreserveSig]
        int GetContainer(out IOleContainer container);
        [PreserveSig]
        int ShowObject();
        [PreserveSig]
        int OnShowWindow(int fShow);
        [PreserveSig]
        int RequestNewObjectLayout();
    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000104-0000-0000-C000-000000000046")]
    public interface IEnumOLEVERB
    {
        [PreserveSig]
        int Next([MarshalAs(UnmanagedType.U4)] int celt, [Out] tagOLEVERB rgelt, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pceltFetched);
        [PreserveSig]
        int Skip([In, MarshalAs(UnmanagedType.U4)] int celt);
        void Reset();
        void Clone(out IEnumOLEVERB ppenum);
    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("0000011B-0000-0000-C000-000000000046")]
    public interface IOleContainer
    {
        [PreserveSig]
        int ParseDisplayName([In, MarshalAs(UnmanagedType.Interface)] object pbc, [In, MarshalAs(UnmanagedType.BStr)] string pszDisplayName, [Out, MarshalAs(UnmanagedType.LPArray)] int[] pchEaten, [Out, MarshalAs(UnmanagedType.LPArray)] object[] ppmkOut);
        [PreserveSig]
        int EnumObjects([In, MarshalAs(UnmanagedType.U4)] int grfFlags, out IEnumUnknown ppenum);
        [PreserveSig]
        int LockContainer(bool fLock);
    }

    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000100-0000-0000-C000-000000000046")]
    public interface IEnumUnknown
    {
        [PreserveSig]
        int Next([In, MarshalAs(UnmanagedType.U4)] int celt, [Out] IntPtr rgelt, IntPtr pceltFetched);
        [PreserveSig]
        int Skip([In, MarshalAs(UnmanagedType.U4)] int celt);
        void Reset();
        void Clone(out IEnumUnknown ppenum);
    }

 

 


 


 



 

 

 


 

 

 


 


 

 

 

 

 

 

 

 

 


 


}
